import request from '@/utils/request'

// 获取设计师资质列表
export function getQualificationList(params) {
  return request({
    url: '/designer/qualifications',
    method: 'get',
    params
  })
}

// 获取设计师资质详情
export function getQualification(id) {
  return request({
    url: `/designer/qualifications/${id}`,
    method: 'get'
  })
}

// 审核设计师资质
export function auditQualification(id, data) {
  return request({
    url: `/designer/qualifications/${id}/audit`,
    method: 'post',
    data
  })
}

// 统计各状态资质数量
export function countQualificationsByStatus() {
  return request({
    url: '/designer/qualifications/count',
    method: 'get'
  })
}

export function approveQualification(id) {
  return request({
    url: `/api/admin/designer/qualification/${id}/approve`,
    method: 'post'
  })
}

export function rejectQualification(id) {
  return request({
    url: `/api/admin/designer/qualification/${id}/reject`,
    method: 'post'
  })
} 